package com.xbts.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xbts.system.domain.CnWorkOrderDetail;
import com.xbts.system.domain.vo.CnWorkOrderDetailVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 工单详细Mapper接口
 * 
 * @author xbts
 * @date 2023-08-28
 */
public interface CnWorkOrderDetailMapper extends BaseMapper<CnWorkOrderDetail> {

    @Select("select cwod.id,cwod.order_num,cwod.user_type,cwod.user_id,cwod.content,cwod.content_type,\n" +
            "cwod.read_status,cwod.create_by,cwod.create_time,cwod.update_by,cwod.update_time,su.avatar\n" +
            "from cn_work_order_detail cwod\n" +
            "left join sys_user su on cwod.create_by = su.user_id ${ew.customSqlSegment} ")
    List<CnWorkOrderDetailVO> queryList(@Param(Constants.WRAPPER) LambdaQueryWrapper<CnWorkOrderDetailVO> queryWrapper);
}
